package com.baizhi.cmfz.dao;

import com.baizhi.cmfz.entity.Admin;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface AdminDao {
    Admin selectAdmin(String username, String password);
    //查询当前页的数据
    List<Admin> showPageAdmin(@Param("offset") int offset, @Param("limit") int limit);
    //查询总条数
    int selectAdminCount();

    int addAdmin(Admin admin);

    int updateAdmin(Admin admin);

    int deleteAdmin(int id);

    Admin selectOneAdmin(String username);
    //根据用户名查询出该用户对应的角色
    Set<String> selectAdminRole(String username);
    //根据用户名查询出该用户对应的权限
    Set<String> selectAdminPermision(String username);
}
